package com.cykj.pos.controller.api;

import com.alibaba.fastjson.JSONObject;
import com.cykj.common.core.controller.BaseController;
import com.cykj.common.core.domain.AjaxResult;
import com.cykj.pos.service.IBizXYFService;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.text.ParseException;

/**
 * @author 许晓龙
 * @date 2024/8/14 9:57
 */

@RequiredArgsConstructor(onConstructor_ = @Autowired)
@RestController
@RequestMapping("/xyf/notice" )
public class BizXYFController extends BaseController {

    private final IBizXYFService iBizXYFService;

    @ApiOperation("星驿付商户信息")
    @PostMapping("/merchantInfo")
    public AjaxResult xyfInfo (@RequestBody JSONObject data) throws ParseException {
       return iBizXYFService.xyfInfo(data);
    }

    @ApiOperation("星驿付流量费")
    @PostMapping("/sim")
    public AjaxResult xyfSim (@RequestBody JSONObject data){
       return iBizXYFService.xyfSim(data);
    }

    @ApiOperation("星驿付解绑")
    @PostMapping("/unbind")
    public AjaxResult xyfUnbind (@RequestBody JSONObject data){
       return iBizXYFService.xyfUnbind(data);
    }

}
